<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>原型链测试</title>

    <script>

        class Person{
        }

        Person.prototype.name = 'aa';
        Person.prototype.age = 12;

        console.log(Person);
        
        var p1 = new Person();
        var p2 = new Person();

        
function Student(){}

Student.prototype = new Person();

        var s = new Student();

        var o1 = {name: 'o1'};
        var o2 = {};
        o2.__proto__ = o1;

        



    </script>
</head>

<body>

</body>

</html>